package club.zhangliyuanblog.service;

import club.zhangliyuanblog.entity.CommonResult;
import club.zhangliyuanblog.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author liyuan.zhang
 * @date 2021/4/22 9:44
 */
@Service
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {

    @GetMapping("/payment/{id}")
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);

    @GetMapping("/payment/timeout/{timeout}")
    String testTimeOut(@PathVariable(value = "timeout") Integer timeout);
}
